function Player(){
    this.session = null;
    this.name = '';
    this.hp = 0;
    this.wuli = 0;
    this.swordLevel = 0;
    this.ownCards = {};
    this.exp = 0;
    this.money = 0;
    this.faceId = '';

    this.win = 0;
    this.lost = 0;
    this.drop = 0;

    this.id = -1;

    //server data
    this.requestBattlePlayerId = -1;
    this.battleId = -1;
}

Player.prototype.setSession = function(session) {this.session = session;}

Player.prototype.getSession = function() {return this.session;};

Player.prototype.setAcc = function(acc) {this.acc = acc;};

Player.prototype.getAcc = function() { return acc;};

Player.prototype.getMoney = function(){return this.money;};

Player.prototype.setMoney = function(money) { this.money = money;};

Player.prototype.getName = function(){return this.name;};

Player.prototype.getHp = function(){return this.hp;};

Player.prototype.setHp = function(hp){this.hp = hp;};

Player.prototype.incHp = function(hp) {this.hp += hp;};

Player.prototype.decHp = function(hp) {this.hp -= hp;};

Player.prototype.getWuli = function() {return this.wuli;};

Player.prototype.setWuli = function(wuli) {this.wuli = wuli;};

Player.prototype.getSwordLevel = function() {return this.swordLevel; };

Player.prototype.setSwordLevel = function(level) {this.swordLevel = level;};

Player.prototype.getOwnCards = function() {return this.ownCards;};

Player.prototype.isOwnCard = function(card) { return this.ownCards.hasOwnProperty(card);};

Player.prototype.winNewCard = function(card) { this.ownCards[card] = true; };

Player.prototype.getExp = function() { return this.exp;};

Player.prototype.setExp = function(exp) {this.exp = exp;};

Player.prototype.copyBattleData = function(battleData){
    battleData.hp = this.hp;
};

Player.prototype.getPlayerId = function(){ return this.id;};

Player.prototype.setPlayerId = function(id) {this.id = id;};

Player.prototype.getMaxCardNum = function(){ return 4 + this.getSwordLevel(); }

Player.prototype.tick = function(){

};

Player.prototype.onDisconnect = function(){
    app.getChannelService().leaveAllChannel(this.id);
}

Player.prototype.setRequestBattlePlayerId = function(id){
    this.requestBattlePlayerId = id;
}

Player.prototype.getRequestBattlePlayerId = function(){
    return this.requestBattlePlayerId;
}

module.exports = Player;



